package com.yc.study.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.study.entity.CheckInTask;
import com.yc.study.mapper.CheckInTaskMapper;
import com.yc.study.service.ICheckInTaskService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yc.study.vo.CheckInTaskVo;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 签到任务 服务实现类
 * </p>
 *
 * @author 王妍
 * @since 2022-05-14
 */
@Service
@AllArgsConstructor
public class CheckInTaskServiceImpl extends ServiceImpl<CheckInTaskMapper, CheckInTask> implements ICheckInTaskService {

    private final CheckInTaskMapper checkInTaskMapper;

    @Override
    public Page<CheckInTaskVo> pageVo(Long userId, Page<CheckInTaskVo> checkInTaskVoPage, CheckInTaskVo checkInTaskVo) {
        return checkInTaskMapper.pageVo(userId,checkInTaskVoPage,checkInTaskVo);
    }

    @Override
    public List<CheckInTaskVo> getList(Long userId,Long courseId) {
        return  checkInTaskMapper.pageVoList(userId,courseId);
    }
}
